@nice2dev/ui 1.0.6 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/NiceAPIFlow.doc-DnQLPUie.js +30 -0
  2. package/dist/NiceAPIFlow.doc-Dx4qw1lm.cjs +6 -0
  3. package/dist/NiceBranchManager.doc-BXjiENlD.cjs +6 -0
  4. package/dist/NiceBranchManager.doc-xLB82YwU.js +30 -0
  5. package/dist/NiceButton-CDiS45Ya.cjs +1 -0
  6. package/dist/NiceButton-D9l39Rs7.js +595 -0
  7. package/dist/NiceCodeTemplate.doc-BWxTE4C_.cjs +6 -0
  8. package/dist/NiceCodeTemplate.doc-CA2U5F-v.js +30 -0
  9. package/dist/NiceDataBranchGraph.doc-CkitupWc.js +29 -0
  10. package/dist/NiceDataBranchGraph.doc-DDUgipqH.cjs +5 -0
  11. package/dist/NiceDataBranchManager.doc-B0ODKOs4.js +30 -0
  12. package/dist/NiceDataBranchManager.doc-CC5o8ihs.cjs +6 -0
  13. package/dist/NiceDataConflictResolver.doc-CdzScNie.cjs +5 -0
  14. package/dist/NiceDataConflictResolver.doc-V8vxYAeo.js +29 -0
  15. package/dist/NiceDataDiffViewer.doc-CR14Bq3A.cjs +6 -0
  16. package/dist/NiceDataDiffViewer.doc-w2I2QjhX.js +30 -0
  17. package/dist/NiceDataMapper.doc-C7jSyHRM.js +30 -0
  18. package/dist/NiceDataMapper.doc-DXjQHz87.cjs +6 -0
  19. package/dist/NiceDataMergeBuilder.doc-CV32WC_w.cjs +6 -0
  20. package/dist/NiceDataMergeBuilder.doc-DtuYb3nx.js +30 -0
  21. package/dist/NiceDataSnapshot.doc-CFLkY3ry.js +30 -0
  22. package/dist/NiceDataSnapshot.doc-CpZyQ17u.cjs +6 -0
  23. package/dist/NiceErrorBoundary-B5nF-OVn.cjs +1 -0
  24. package/dist/NiceErrorBoundary-BAeqfoSc.cjs +1 -0
  25. package/dist/NiceErrorBoundary-D75yr_WE.js +762 -0
  26. package/dist/NiceErrorBoundary-niMx1aSJ.js +837 -0
  27. package/dist/NiceEventOrchestrator.doc-C4SJfIDV.js +30 -0
  28. package/dist/NiceEventOrchestrator.doc-CxjsLxBG.cjs +6 -0
  29. package/dist/NiceForm-CKoJA6NG.js +5131 -0
  30. package/dist/NiceForm-D7xnpnRJ.cjs +382 -0
  31. package/dist/NiceForm.css +1 -0
  32. package/dist/NiceGitBlame.doc-BG3_K9_0.cjs +6 -0
  33. package/dist/NiceGitBlame.doc-DrJABEat.js +30 -0
  34. package/dist/NiceGitConflictResolver.doc-BK7hAfz6.js +30 -0
  35. package/dist/NiceGitConflictResolver.doc-CgroGM9_.cjs +6 -0
  36. package/dist/NiceGitDiffViewer.doc-BAwgcY_3.cjs +6 -0
  37. package/dist/NiceGitDiffViewer.doc-BXKJeP-E.js +30 -0
  38. package/dist/NiceGitGraph.doc-B-WtGuzn.cjs +5 -0
  39. package/dist/NiceGitGraph.doc-DxnDPCgC.js +29 -0
  40. package/dist/NiceGitHooks.doc-BrEizvMp.js +29 -0
  41. package/dist/NiceGitHooks.doc-C4EdV5zj.cjs +5 -0
  42. package/dist/NiceMergeRequestBuilder.doc-C5p8mYuh.cjs +6 -0
  43. package/dist/NiceMergeRequestBuilder.doc-Ct9RCmU8.js +30 -0
  44. package/dist/NiceModal-1QX7NhyH.js +95 -0
  45. package/dist/NiceModal-CAwsKVQ2.cjs +1 -0
  46. package/dist/NiceModuleLifecyclePanel-Brg1RLwi.cjs +1 -0
  47. package/dist/NiceModuleLifecyclePanel-C9xMSjOF.cjs +1 -0
  48. package/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5249 -0
  49. package/dist/NiceModuleLifecyclePanel-I_TXRiiY.js +5053 -0
  50. package/dist/NiceModuleLifecyclePanel.css +1 -0
  51. package/dist/NicePagination-DbE-uOkl.js +171 -0
  52. package/dist/NicePagination-DlealakT.cjs +1 -0
  53. package/dist/NicePinCodeInput-B8cI8zu8.js +11830 -0
  54. package/dist/NicePinCodeInput-CrMfdxxc.js +15287 -0
  55. package/dist/NicePinCodeInput-D0aF9MK8.cjs +692 -0
  56. package/dist/NicePinCodeInput-SGQaHvpE.cjs +419 -0
  57. package/dist/NicePinCodeInput.css +1 -1
  58. package/dist/NicePipelineEditor.doc-0eGt8zbX.cjs +5 -0
  59. package/dist/NicePipelineEditor.doc-DTmaOebn.js +29 -0
  60. package/dist/NicePipelineMonitor.doc-67CmsRcf.cjs +5 -0
  61. package/dist/NicePipelineMonitor.doc-mSMdhuG8.js +29 -0
  62. package/dist/NiceSavedQueryPanel-BZNvqSQW.cjs +596 -0
  63. package/dist/NiceSavedQueryPanel-CUAsdOjJ.js +6190 -0
  64. package/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6449 -0
  65. package/dist/NiceSavedQueryPanel-Ce2s060j.cjs +596 -0
  66. package/dist/NiceStateDesigner.doc-B36u0hNU.js +29 -0
  67. package/dist/NiceStateDesigner.doc-MPmvNHSx.cjs +5 -0
  68. package/dist/NiceTabs-DvOmxKyQ.cjs +1 -0
  69. package/dist/NiceTabs-DzLHzwuA.js +1636 -0
  70. package/dist/NiceTestBuilder.doc-BFInj8GJ.js +30 -0
  71. package/dist/NiceTestBuilder.doc-CB03U_uR.cjs +6 -0
  72. package/dist/NiceToggle-CaY1u82g.js +277 -0
  73. package/dist/NiceToggle-DFJFQv_Z.cjs +1 -0
  74. package/dist/NiceWindow-CVgkxcCz.cjs +1 -0
  75. package/dist/NiceWindow-DeC83yfE.js +1409 -0
  76. package/dist/NiceWindow-IdHAcP70.cjs +1 -0
  77. package/dist/NiceWindow-SiCaREbq.js +1408 -0
  78. package/dist/charts-BAS21jkC.js +4621 -0
  79. package/dist/charts-Bx_kNBsE.js +4280 -0
  80. package/dist/charts-DECVsCHX.cjs +754 -0
  81. package/dist/charts-DShUbWrP.cjs +759 -0
  82. package/dist/charts.cjs +1 -1
  83. package/dist/charts.css +1 -0
  84. package/dist/charts.d.ts +45 -48
  85. package/dist/charts.mjs +1 -1
  86. package/dist/core-BZBTsGWN.cjs +96 -0
  87. package/dist/core-BpghV7Ls.js +17555 -0
  88. package/dist/core-C2ZmWe_u.cjs +96 -0
  89. package/dist/core-Da43q-pO.js +22094 -0
  90. package/dist/data-branching-CJlrg8qf.cjs +1 -0
  91. package/dist/data-branching-DCUwI53s.js +6121 -0
  92. package/dist/data-branching-De4ExX-S.cjs +1 -0
  93. package/dist/data-branching-DiRfob1f.js +6071 -0
  94. package/dist/data-branching.cjs +1 -0
  95. package/dist/data-branching.d.ts +364 -0
  96. package/dist/data-branching.mjs +9 -0
  97. package/dist/data.cjs +1 -1
  98. package/dist/data.d.ts +206 -192
  99. package/dist/data.mjs +1 -1
  100. package/dist/devops-BnYinjkT.cjs +17 -0
  101. package/dist/devops-CXynFG3X.cjs +17 -0
  102. package/dist/devops-Ckh57eti.js +7198 -0
  103. package/dist/devops-D0TfzV5B.js +7660 -0
  104. package/dist/devops.cjs +1 -0
  105. package/dist/devops.d.ts +721 -0
  106. package/dist/devops.mjs +12 -0
  107. package/dist/editors.cjs +1 -1
  108. package/dist/editors.d.ts +311 -393
  109. package/dist/editors.mjs +61 -64
  110. package/dist/feedback.cjs +1 -1
  111. package/dist/feedback.d.ts +3 -44
  112. package/dist/feedback.mjs +11 -10
  113. package/dist/index-B8wxZ8Ps.cjs +5192 -0
  114. package/dist/index-CBIZ6mTQ.cjs +5734 -0
  115. package/dist/index-CIl98Vbm.js +72951 -0
  116. package/dist/index-pAuGTbuB.js +57319 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.css +1 -1
  119. package/dist/index.d.ts +4673 -10015
  120. package/dist/index.mjs +880 -969
  121. package/dist/lazy.cjs +1 -0
  122. package/dist/lazy.d.ts +1848 -0
  123. package/dist/lazy.mjs +98 -0
  124. package/dist/navigation.cjs +1 -1
  125. package/dist/navigation.d.ts +151 -216
  126. package/dist/navigation.mjs +111 -48
  127. package/dist/no-code-B5bzduNP.cjs +332 -0
  128. package/dist/no-code-BCuadkm4.cjs +332 -0
  129. package/dist/no-code-D8RJ7lx0.js +7064 -0
  130. package/dist/no-code-TL7PyulA.js +7005 -0
  131. package/dist/no-code.cjs +1 -0
  132. package/dist/no-code.d.ts +833 -0
  133. package/dist/no-code.mjs +13 -0
  134. package/dist/overlays.cjs +1 -1
  135. package/dist/overlays.d.ts +13 -45
  136. package/dist/overlays.mjs +490 -24
  137. package/package.json +24 -2
@@ -0,0 +1,30 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", o = "NiceAPIFlow", n = "Visual API workflow builder with drag-and-drop nodes for REST/GraphQL integrations.", t = "no-code", c = "1.0.7", i = "stable", a = [{ name: "flow", type: "APIFlow", required: !0, description: "Flow configuration" }, { name: "onChange", type: "(flow: APIFlow) => void", description: "Flow change callback" }, { name: "endpoints", type: "APIEndpoint[]", description: "Available API endpoints" }, { name: "onExecute", type: "(flow: APIFlow) => Promise<FlowResult>", description: "Execute flow callback" }], s = [{ title: "API Flow Builder", description: "Build API integration workflows", code: `<NiceAPIFlow
2
+ flow={currentFlow}
3
+ onChange={handleFlowChange}
4
+ endpoints={availableAPIs}
5
+ onExecute={handleExecute}
6
+ />` }], l = { role: "application", ariaLabel: "API flow designer" }, r = ["NiceDataMapper", "NiceEventOrchestrator"], d = {
7
+ $schema: e,
8
+ name: o,
9
+ description: n,
10
+ category: t,
11
+ since: c,
12
+ status: i,
13
+ props: a,
14
+ examples: s,
15
+ accessibility: l,
16
+ seeAlso: r
17
+ };
18
+ export {
19
+ e as $schema,
20
+ l as accessibility,
21
+ t as category,
22
+ d as default,
23
+ n as description,
24
+ s as examples,
25
+ o as name,
26
+ a as props,
27
+ r as seeAlso,
28
+ c as since,
29
+ i as status
30
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",o="NiceAPIFlow",n="Visual API workflow builder with drag-and-drop nodes for REST/GraphQL integrations.",t="no-code",s="1.0.7",c="stable",i=[{name:"flow",type:"APIFlow",required:!0,description:"Flow configuration"},{name:"onChange",type:"(flow: APIFlow) => void",description:"Flow change callback"},{name:"endpoints",type:"APIEndpoint[]",description:"Available API endpoints"},{name:"onExecute",type:"(flow: APIFlow) => Promise<FlowResult>",description:"Execute flow callback"}],a=[{title:"API Flow Builder",description:"Build API integration workflows",code:`<NiceAPIFlow
2
+ flow={currentFlow}
3
+ onChange={handleFlowChange}
4
+ endpoints={availableAPIs}
5
+ onExecute={handleExecute}
6
+ />`}],l={role:"application",ariaLabel:"API flow designer"},r=["NiceDataMapper","NiceEventOrchestrator"],d={$schema:e,name:o,description:n,category:t,since:s,status:c,props:i,examples:a,accessibility:l,seeAlso:r};exports.$schema=e;exports.accessibility=l;exports.category=t;exports.default=d;exports.description=n;exports.examples=a;exports.name=o;exports.props=i;exports.seeAlso=r;exports.since=s;exports.status=c;
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",n="NiceBranchManager",c="Git branch management panel with create, delete, checkout, and merge operations.",t="devops",a="1.0.7",r="stable",s=[{name:"branches",type:"GitBranch[]",required:!0,description:"List of branches"},{name:"currentBranch",type:"string",description:"Currently checked out branch"},{name:"onCheckout",type:"(branch: string) => Promise<void>",description:"Checkout branch callback"},{name:"onCreate",type:"(name: string, from: string) => Promise<void>",description:"Create branch callback"},{name:"onDelete",type:"(branch: string) => Promise<void>",description:"Delete branch callback"},{name:"onMerge",type:"(source: string, target: string) => Promise<void>",description:"Merge branch callback"}],o=[{title:"Branch Manager",description:"Manage Git branches",code:`<NiceBranchManager
2
+ branches={branches}
3
+ currentBranch="main"
4
+ onCheckout={handleCheckout}
5
+ onCreate={handleCreate}
6
+ />`}],i={role:"region",ariaLabel:"Git branch manager"},h=["NiceGitGraph","NiceMergeRequestBuilder"],l={$schema:e,name:n,description:c,category:t,since:a,status:r,props:s,examples:o,accessibility:i,seeAlso:h};exports.$schema=e;exports.accessibility=i;exports.category=t;exports.default=l;exports.description=c;exports.examples=o;exports.name=n;exports.props=s;exports.seeAlso=h;exports.since=a;exports.status=r;
@@ -0,0 +1,30 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceBranchManager", c = "Git branch management panel with create, delete, checkout, and merge operations.", a = "devops", r = "1.0.7", t = "stable", o = [{ name: "branches", type: "GitBranch[]", required: !0, description: "List of branches" }, { name: "currentBranch", type: "string", description: "Currently checked out branch" }, { name: "onCheckout", type: "(branch: string) => Promise<void>", description: "Checkout branch callback" }, { name: "onCreate", type: "(name: string, from: string) => Promise<void>", description: "Create branch callback" }, { name: "onDelete", type: "(branch: string) => Promise<void>", description: "Delete branch callback" }, { name: "onMerge", type: "(source: string, target: string) => Promise<void>", description: "Merge branch callback" }], s = [{ title: "Branch Manager", description: "Manage Git branches", code: `<NiceBranchManager
2
+ branches={branches}
3
+ currentBranch="main"
4
+ onCheckout={handleCheckout}
5
+ onCreate={handleCreate}
6
+ />` }], i = { role: "region", ariaLabel: "Git branch manager" }, h = ["NiceGitGraph", "NiceMergeRequestBuilder"], d = {
7
+ $schema: e,
8
+ name: n,
9
+ description: c,
10
+ category: a,
11
+ since: r,
12
+ status: t,
13
+ props: o,
14
+ examples: s,
15
+ accessibility: i,
16
+ seeAlso: h
17
+ };
18
+ export {
19
+ e as $schema,
20
+ i as accessibility,
21
+ a as category,
22
+ d as default,
23
+ c as description,
24
+ s as examples,
25
+ n as name,
26
+ o as props,
27
+ h as seeAlso,
28
+ r as since,
29
+ t as status
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("react"),n=require("./core-BZBTsGWN.cjs"),re=i.forwardRef(({label:j,helperText:v,error:t,required:T,disabled:r,readOnly:o,size:q="md",name:w,id:g,className:R,style:y,accessMode:h,displayStyle:k,value:_,defaultValue:m,onChange:$,onBlur:d,onKeyDown:x,placeholder:M,type:D="text",maxLength:A,prefix:I,suffix:B,clearable:l,autoFocus:G,submitOnEnter:S,onSubmit:E,showKeyboardHints:J,...z},Z)=>{const H=n.useNiceAccessMode(h,g);if(H==="hidden")return null;H==="disabled"&&(r=!0),H==="readOnly"&&(o=!0);const{t:O}=n.useNiceTranslation(),u=n.useControlId(g),ee=n.useComponentDisplayStyle("input",k),se=n.useComponentDisplayClass("input",k),Q=i.useCallback(()=>$?.(""),[$]),C=n.useSubmitOnEnter({enabled:S,onSubmit:E}),F=i.useCallback(p=>{C(p),x?.(p)},[C,x]),L=i.useMemo(()=>{const p=[];return S&&p.push({key:"Enter",description:O("shortcuts.submit","Submit")}),l&&p.push({key:"Escape",description:O("shortcuts.clear","Clear")}),p},[S,l,O]);return e.jsxs("div",{className:`nice-field ${R||""}`,style:y,children:[j&&e.jsxs("label",{htmlFor:u,className:`nice-field__label ${T?"nice-field__label--required":""}`,children:[j,J&&L.length>0&&e.jsx(n.NiceKeyboardHint,{shortcuts:L,size:"sm"})]}),e.jsxs("div",{className:`nice-input nice-input--${q} nice-input--ds-${se} ${t?"nice-input--error":""} ${r?"nice-input--disabled":""} ${o?"nice-input--readonly":""}`,style:ee,children:[I&&e.jsx("span",{className:"nice-input__icon",children:I}),e.jsx("input",{ref:Z,id:u,className:"nice-input__native",type:D,name:w,value:_,defaultValue:m,placeholder:M,disabled:r,readOnly:o,maxLength:A,autoFocus:G,"aria-invalid":!!t,"aria-describedby":t?`${u}-error`:v?`${u}-helper`:void 0,onChange:p=>$?.(p.target.value),onBlur:d,onKeyDown:F,...z}),l&&_&&e.jsx("button",{type:"button",className:"nice-input__clear",onClick:Q,"aria-label":O("controls.clear","Clear"),children:"✕"}),B&&e.jsx("span",{className:"nice-input__icon",children:B})]}),t&&e.jsx("div",{id:`${u}-error`,className:"nice-field__error",role:"alert",children:t}),!t&&v&&e.jsx("div",{id:`${u}-helper`,className:"nice-field__helper",children:v})]})});re.displayName="NiceTextInput";const ae=i.forwardRef(({label:j,helperText:v,error:t,required:T,disabled:r,size:o="md",name:q,id:w,className:g,style:R,accessMode:y,displayStyle:h,options:k,value:_,onChange:m,placeholder:$,multiple:d=!1,searchable:x=!1,clearable:M=!1,emptyText:D,maxHeight:A=240,optionsSource:I,valueField:B,labelField:l,virtualScroll:G,optionHeight:S=36,onSearch:E,loading:J,renderOption:z,showKeyboardHints:Z},H)=>{const O=n.useNiceAccessMode(y,w);if(O==="hidden")return null;(O==="disabled"||O==="readOnly")&&(r=!0);const{t:u}=n.useNiceTranslation(),ee=n.useComponentDisplayStyle("input",h),se=n.useComponentDisplayClass("input",h),Q=n.useControlId(w),[C,F]=i.useState(!1),[L,p]=i.useState(""),[K,W]=i.useState(-1),[ie,ue]=i.useState(0),ce=i.useRef(null),pe=n.useNiceLookupSource(I??null,B??I?.keyField??"id",l??"name"),P=I?pe.options:k??[];n.useClickOutside(ce,()=>{F(!1),p("")});const f=i.useMemo(()=>_?Array.isArray(_)?_:[_]:[],[_]),N=i.useMemo(()=>{if(!L&&!E||E)return P;const s=L.toLowerCase();return P.filter(a=>a.label.toLowerCase().includes(s)||String(a.value).toLowerCase().includes(s))},[P,L,E]),le=i.useMemo(()=>{const s=new Map;for(const a of N){const c=a.group||"";s.has(c)||s.set(c,[]),s.get(c).push(a)}return s},[N]),V=i.useCallback(s=>{if(d){const a=f.includes(s)?f.filter(c=>c!==s):[...f,s];m?.(a)}else m?.(s),F(!1),p("")},[d,f,m]),he=i.useCallback(s=>{if(s.key==="Escape"){F(!1),p("");return}if(s.key==="Enter"||s.key===" "){if(!C){F(!0),s.preventDefault();return}K>=0&&N[K]&&(V(N[K].value),s.preventDefault());return}s.key==="ArrowDown"&&(s.preventDefault(),W(a=>Math.min(a+1,N.length-1))),s.key==="ArrowUp"&&(s.preventDefault(),W(a=>Math.max(a-1,0)))},[C,K,N,V]),te=i.useMemo(()=>f.length===0?null:d?f.map(s=>P.find(a=>a.value===s)?.label||s).join(", "):P.find(s=>s.value===f[0])?.label||f[0],[f,P,d]),_e=i.useCallback(s=>{s.stopPropagation(),m?.(d?[]:"")},[m,d]),me=i.useMemo(()=>[{key:"Enter",description:u("shortcuts.select","Select")},{key:"Space",description:u("shortcuts.openDropdown","Open dropdown")},n.COMMON_SHORTCUTS.moveUp,n.COMMON_SHORTCUTS.moveDown,n.COMMON_SHORTCUTS.cancel],[u]);return e.jsxs("div",{className:`nice-field ${g||""}`,style:R,children:[j&&e.jsxs("label",{htmlFor:Q,className:`nice-field__label ${T?"nice-field__label--required":""}`,children:[j,Z&&e.jsx(n.NiceKeyboardHint,{shortcuts:me,size:"sm"})]}),e.jsxs("div",{className:"nice-select",ref:ce,children:[e.jsxs("button",{ref:H,type:"button",id:Q,role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-invalid":!!t,className:`nice-select__trigger nice-select__trigger--${o} nice-select--ds-${se} ${C?"nice-select__trigger--open":""} ${t?"nice-select__trigger--error":""} ${r?"nice-select__trigger--disabled":""}`,style:ee,disabled:r,onClick:()=>F(!C),onKeyDown:he,children:[te?e.jsx("span",{children:te}):e.jsx("span",{className:"nice-select__placeholder",children:$||u("controls.select","Select...")}),e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[M&&f.length>0&&e.jsx("span",{className:"nice-input__clear",onClick:_e,role:"button","aria-label":u("controls.clear","Clear"),children:"✕"}),e.jsx("svg",{className:`nice-select__chevron ${C?"nice-select__chevron--open":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),C&&e.jsxs("div",{className:"nice-select__dropdown",role:"listbox",style:{maxHeight:A},onScroll:G?s=>ue(s.currentTarget.scrollTop):void 0,children:[(x||E)&&e.jsx("div",{className:"nice-select__search",children:e.jsx("input",{type:"text",value:L,onChange:s=>{p(s.target.value),W(0),E?.(s.target.value)},placeholder:u("controls.search","Search..."),autoFocus:!0})}),J&&e.jsx("div",{className:"nice-select__loading",children:e.jsx("div",{className:"nice-spinner nice-spinner--sm",style:{margin:"8px auto"}})}),!J&&N.length===0?e.jsx("div",{className:"nice-select__empty",children:D||u("controls.noResults","No results found")}):G&&!Array.from(le.keys()).some(s=>s!=="")?(()=>{const a=N.length*S,c=Math.max(0,Math.floor(ie/S)-3),U=Math.min(N.length,Math.ceil((ie+A)/S)+3),X=N.slice(c,U);return e.jsx("div",{style:{height:a,position:"relative"},children:X.map((b,xe)=>{const ne=c+xe,Y=f.includes(b.value);return e.jsx("div",{role:"option","aria-selected":Y,className:`nice-select__option ${Y?"nice-select__option--selected":""} ${ne===K?"nice-select__option--highlighted":""} ${b.disabled?"nice-select__option--disabled":""}`,style:{position:"absolute",top:ne*S,left:0,right:0,height:S,display:"flex",alignItems:"center",padding:"0 12px"},onClick:()=>!b.disabled&&V(String(b.value)),onMouseEnter:()=>W(ne),children:z?z(b,Y):e.jsxs(e.Fragment,{children:[b.icon&&e.jsx("span",{children:b.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:b.label}),b.description&&e.jsx("div",{className:"nice-select__option-desc",children:b.description})]}),Y&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},b.value)})})})():Array.from(le.entries()).map(([s,a])=>e.jsxs(i.Fragment,{children:[s&&e.jsx("div",{className:"nice-select__group-label",children:s}),a.map(c=>{const U=f.includes(c.value),X=N.indexOf(c);return e.jsx("div",{role:"option","aria-selected":U,className:`nice-select__option ${U?"nice-select__option--selected":""} ${X===K?"nice-select__option--highlighted":""} ${c.disabled?"nice-select__option--disabled":""}`,onClick:()=>!c.disabled&&V(String(c.value)),onMouseEnter:()=>W(X),children:z?z(c,U):e.jsxs(e.Fragment,{children:[c.icon&&e.jsx("span",{children:c.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:c.label}),c.description&&e.jsx("div",{className:"nice-select__option-desc",children:c.description})]}),U&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},c.value)})]},s))]})]}),t&&e.jsx("div",{className:"nice-field__error",role:"alert",children:t}),!t&&v&&e.jsx("div",{className:"nice-field__helper",children:v})]})});ae.displayName="NiceSelect";const fe=["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899","#64748b","#1e293b"];function ve(){return"#"+Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}const oe=i.forwardRef(({label:j,helperText:v,error:t,required:T,disabled:r,id:o,className:q,style:w,accessMode:g,displayStyle:R,value:y="#3b82f6",onChange:h,presets:k=fe,showInput:_=!0,showRandom:m=!0,showKeyboardHints:$},d)=>{const x=n.useNiceAccessMode(g,o);if(x==="hidden")return null;(x==="disabled"||x==="readOnly")&&(r=!0);const{t:M}=n.useNiceTranslation(),D=n.useControlId(o);n.useComponentDisplayClass("input",R);const A=i.useRef(null),I=i.useCallback(()=>{r||h?.(ve())},[r,h]),B=i.useMemo(()=>[{key:"Enter",description:M("shortcuts.openPicker","Open color picker")},{key:"Arrow keys",description:M("shortcuts.navigatePresets","Navigate presets")}],[M]);return e.jsxs("div",{className:`nice-field ${q||""}`,style:w,children:[j&&e.jsxs("label",{htmlFor:D,className:`nice-field__label ${T?"nice-field__label--required":""}`,children:[j,$&&e.jsx(n.NiceKeyboardHint,{shortcuts:B,size:"sm"})]}),e.jsxs("div",{className:"nice-color-picker",children:[e.jsxs("div",{className:"nice-color-picker__preview-row",children:[e.jsx("div",{className:"nice-color-picker__swatch",style:{background:y},onClick:()=>A.current?.click(),role:"button",tabIndex:0,"aria-label":"Pick color",children:e.jsx("input",{ref:l=>{A.current=l,typeof d=="function"?d(l):d&&(d.current=l)},type:"color",className:"nice-color-picker__native",id:D,value:y,disabled:r,onChange:l=>h?.(l.target.value)})}),_&&e.jsx("div",{className:"nice-input nice-input--sm",style:{width:100},children:e.jsx("input",{className:"nice-input__native",type:"text",value:y,disabled:r,onChange:l=>h?.(l.target.value),maxLength:7})}),m&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--outline nice-btn--sm nice-color-picker__random",onClick:I,disabled:r,title:"Random color","aria-label":"Random color",children:"🎲"})]}),k.length>0&&e.jsx("div",{className:"nice-color-picker__presets",children:k.map(l=>e.jsx("div",{className:`nice-color-picker__preset ${y===l?"nice-color-picker__preset--active":""}`,style:{background:l},onClick:()=>h?.(l),role:"button",tabIndex:0,"aria-label":l},l))})]}),t&&e.jsx("div",{className:"nice-field__error",role:"alert",children:t}),!t&&v&&e.jsx("div",{className:"nice-field__helper",children:v})]})});oe.displayName="NiceColorPicker";const de=i.forwardRef(({children:j,variant:v="primary",size:t="md",type:T="button",disabled:r,loading:o,fullWidth:q,onClick:w,leftIcon:g,rightIcon:R,className:y,style:h,id:k,accessMode:_,displayStyle:m,...$},d)=>{const x=n.useNiceAccessMode(_,k);if(x==="hidden")return null;(x==="disabled"||x==="readOnly")&&(r=!0);const M=n.useComponentDisplayStyle("button",m),D=n.useComponentDisplayClass("button",m);return e.jsxs("button",{ref:d,type:T,id:k,className:`nice-btn nice-btn--${v} nice-btn--${t} nice-btn--ds-${D} ${q?"nice-btn--full-width":""} ${o?"nice-btn--loading":""} ${y||""}`,style:{...M,...h},disabled:r||o,"aria-busy":o||void 0,"aria-disabled":r||o||void 0,onClick:w,...$,children:[o&&e.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),!o&&g&&e.jsx("span",{"aria-hidden":"true",children:g}),e.jsx("span",{children:j}),!o&&R&&e.jsx("span",{"aria-hidden":"true",children:R})]})});de.displayName="NiceButton";exports.NiceButton=de;exports.NiceColorPicker=oe;exports.NiceSelect=ae;exports.NiceTextInput=re;